﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<script type="text/javascript">
    $(function () {
        initControl();
        gridList();
    });
    function initControl() {
        $('select').bindSelect();
    }
    function gridList() {
        var $gridList1 = $("#gridList1");
        $gridList1.dataGrid({
            //url: "/SystemManage/User/GetGridJson",
            height: $(window).height() - 280,
            colModel: [
                { label: '序号', name: '', width: 40, align: 'center' },
                { label: '零部件号', name: '', width: 80, align: 'center' },
                { label: '零件名称', name: '', width: 80, align: 'center' },
                { label: '单位', name: '', width: 80, align: 'center' },
                { label: '车间', name: '', width: 80, align: 'center' },
                { label: '材料编码', name: '', width: 80, align: 'center' },
                { label: '材料名称', name: '', width: 80, align: 'center' },
                { label: '材料牌号', name: '', width: 80, align: 'center' },
                { label: '材料规格(mm)', name: '', width: 80, align: 'center' },
                { label: '标准编号', name: '', width: 80, align: 'center' },
                { label: '特殊要求', name: '', width: 80, align: 'center' },
                { label: '可制件数', name: '', width: 80, align: 'center' },
                { label: '毛坯类别', name: '', width: 80, align: 'center' },
                { label: '纤维方向', name: '', width: 80, align: 'center' },
                { label: '毛坯尺寸(mm)', name: '', width: 80, align: 'center' },
                { label: '宽度公差(mm)', name: '', width: 80, align: 'center' },
                { label: '长度公差(mm)', name: '', width: 80, align: 'center' },
                { label: '毛坯重量(kg)', name: '', width: 80, align: 'center' },
                { label: '材料定额(kg)', name: '', width: 80, align: 'center' },
                { label: '零件净重(kg)', name: '', width: 80, align: 'center' },
                { label: '利废零件', name: '', width: 80, align: 'center' },
                { label: '利废单位', name: '', width: 80, align: 'center' },
                { label: '利废车间', name: '', width: 80, align: 'center' },
                { label: '比例(%)', name: '', width: 80, align: 'center' },
                { label: '代用材料', name: '', width: 80, align: 'center' },
                { label: '备注说明', name: '', width: 80, align: 'center' },
                { label: '更改单编号', name: '', width: 80, align: 'center' },
                { label: '更改单日期', name: '', width: 80, align: 'center' },
                { label: '创建人员', name: '', width: 80, align: 'center' },
                { label: '创建日期', name: '', width: 80, align: 'center' },
                { label: '创建时间', name: '', width: 80, align: 'center' },
                { label: '更改人员', name: '', width: 80, align: 'center' },
                { label: '更改日期', name: '', width: 80, align: 'center' },
                { label: '更改时间', name: '', width: 80, align: 'center' }
            ],
            pager: "#gridPager1",
            sortname: 'F_DepartmentId asc,F_CreatorTime desc',
            viewrecords: true
        });
        $("#btn_search").click(function () {
            $gridList1.jqGrid('setGridParam', {
                postData: { keyword: $("#txt_keyword").val() },
            }).trigger('reloadGrid');
        });
        var $gridList2 = $("#gridList2");
        $gridList2.dataGrid({
            //url: "/SystemManage/User/GetGridJson",
            height: $(window).height() - 280,
            colModel: [
                { label: '序号', name: '', width: 40, align: 'center' },
                { label: '产品编号', name: '', width: 80, align: 'center' },
                { label: '用量', name: '', width: 80, align: 'center' }
            ],
            pager: "#gridPager2",
            sortname: 'F_DepartmentId asc,F_CreatorTime desc',
            viewrecords: true
        });
    }
</script>
<div id="layout" style="height: 100%; width: 100%;">
    <form id="form1">
        <div style="padding: 12px 0 5px 0; padding-left: 15px; border-bottom: 1px solid #ccc; text-align:right;" class="line-table input-width-185">
            <div class="btn-group">
                <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-refresh"></span> 刷新</a>
                <a id="" class="btn btn-primary center-block" onclick="" href="/BOM/MaterialQuota/Schedule"><span class="glyphicon glyphicon-th-list"></span> 明细</a>
                <a id="" class="btn btn-primary center-block" onclick="" href="/BOM/MaterialQuota/Models"><span class="glyphicon glyphicon-plus"></span> 车型</a>
                <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-minus"></span> 贯标</a>
                <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-download"></span> 导出</a>
            </div>
        </div>
        <table class="form">
            <tr>
                <th class="formTitle" style="width:80px;">零部件号</th>
                <td class="formValue input-width-185" style="width:190px;">
                    <input id="" type="text" class="form-control" value="" />
                </td>
                <th class="formTitle" style="width:80px;">生产单位</th>
                <td class="formValue input-width-185" style="width:190px;">
                    <select id="" class="form-control">
                        <option>&nbsp;</option>
                    </select>
                </td>
                <th class="formTitle" style="width:80px;">材料牌号</th>
                <td class="formValue input-width-185" style="width:190px;">
                    <input id="" type="text" class="form-control" value="" />
                </td>
                <th class="formTitle" style="width:80px;">更改单号</th>
                <td class="formValue input-width-185" style="width:190px;">
                    <input id="" type="text" class="form-control" value="" />
                </td>
                <td style="text-align:left;padding-left:20px;" rowspan="2">
                    <div class="btn-group">
                        <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-search"></span> 检索</a>
                    </div>
                </td>
            </tr>
            <tr>
                <th class="formTitle">零部名称</th>
                <td class="formValue input-width-185">
                    <input id="" type="text" class="form-control" value="" />
                </td>
                <th class="formTitle">生产车间</th>
                <td class="formValue input-width-185">
                    <select id="" class="form-control">
                        <option>&nbsp;</option>
                    </select>
                </td>
                <th class="formTitle">材料规格</th>
                <td class="formValue input-width-185">
                    <input id="" type="text" class="form-control" value="" />
                </td>
                <th class="formTitle">更改单日期</th>
                <td class="formValue input-width-185">
                    <input id="" type="text" class="form-control input-wdatepicker" value="" onfocus="WdatePicker()" />
                </td>
            </tr>
        </table>
    </form>
    <div style="">
        <div>
            <div style="width:79.8%;float:left;">
                <table id="gridList1"></table>
                <div id="gridPager1"></div>
            </div>
            <div style="width:20%;float:right;">
                <table id="gridList2"></table>
                <div id="gridPager2"></div>
            </div>
            <div style="clear:both;"></div>
        </div>
    </div>
    <div style="height:260px;margin:5px 0;padding:5px;border:1px solid #ccc;">
        
    </div>
</div>

